package it.blueocean.acanto.web.platform.components.feedback;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.markup.html.panel.Panel;

public class SelectContentPanel extends Panel
{
	private static final long serialVersionUID = -604479023723674296L;

	/**
	 * 
	 * @param id
	 */
	public SelectContentPanel(String id)
	{
		super(id);

		// Create the form, to use later for the buttons
		Form<Object> form = new Form<Object>("form");
		add(form);
		
		FeedbackPanel feedbackPanel = new FeedbackPanel("panel");
		form.add(feedbackPanel);

		// Add a cancel / close button.
		form.add(new AjaxButton("close")
		{
			private static final long serialVersionUID = -4874145270683123040L;

			public void onSubmit(AjaxRequestTarget target, Form<?> form)
			{
				onCancel(target);
			}
		});
	}

	public void onCancel(AjaxRequestTarget target)
	{
	}
}
